package com.jawmask.android.stuartproair.ui;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.ListView;

import com.jawmask.android.stuartproair.R;
import com.jawmask.android.stuartproair.constants.AppConstants;

public class EquipmentTypeActivity extends BaseListActivity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.list_view_layout, true);
		setTitle(getString(R.string.equipment_type_smart));

		setListAdapter(new ListItemAdapter(getResources().getStringArray(R.array.equipment_type_actions)));
	}

	@Override
	protected void onListItemClick(ListView l, View v, int position, long id) {
		String selectedSocialNetworkName = (String) getListAdapter().getItem(position);

		Intent intent = new Intent();
		intent.putExtra(AppConstants.EXTRA_KEY_NAME_SELECTED_RESULT, selectedSocialNetworkName);
		setResult(RESULT_OK, intent);
		finish();
	}
}
